<template>
	<view>
		<cu-custom bgColor="bg-blue" :isBack="true">
			<block slot="backText">返回</block>
			<block slot="content">订单发货</block>
		</cu-custom>
		<view class="cu-bar bg-white" v-if="orderLogistics.detailAddress">
			<view class="action">
				收货人
			</view>
			<view class="action">
				<view class="text-black">{{orderLogistics.addresseeName}}</view>
			</view>
		</view>
		<view class="cu-bar bg-white" v-if="orderLogistics.telephone">
			<view class="action">
				联系电话
			</view>
			<view class="action">
				<view class="text-black">{{orderLogistics.telephone}}</view>
			</view>
		</view>
		<view class="cu-bar bg-white" v-if="orderLogistics.detailAddress">
			<view class="action">
				收货地址
			</view>
			<view class="action">
				<view class="text-black">{{orderLogistics.detailAddress}}</view>
			</view>
		</view>
		<view>
			<view class="text-bold">发货信息</view>
			<view class="cu-bar bg-white" v-if="orderLogistics.detailAddress">
				<view class="action">
					快递单号
				</view>
				<view class="action">
					<view class="text-black">{{orderLogistics.detailAddress}}</view>
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	import {
		getObj
	} from '@/api/mall/orderlogistics.js'
	import {
		getList
	} from '@/api/mall/logisticscompanyconfig.js'
	export default {
		data() {
			return {
				orderLogistics: {},
				logisticsCompanyList: []
			}
		},
		onLoad(props) {
			this.getLogisticsDetail(props.logisticsId);
			this.getList();
		},
		methods: {
			getLogisticsDetail(logisticsId) {
				getObj(logisticsId).then(res => {
					this.orderLogistics = res.data;

				})
			},
			getList() {
				getList().then(res => {
					this.logisticsCompanyList = res.data;
				})
			}
		}
	}
</script>

<style>
</style>
